package org.jeecg.modules.rental.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 租车车辆信息
 * @Author: jeecg-boot
 * @Date:   2024-04-28
 * @Version: V1.0
 */
@Data
@TableName("rental_car")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="rental_car对象", description="租车车辆信息")
public class RentalEBike implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**内部编码*/
    @Excel(name = "内部编码", width = 15)
    @ApiModelProperty(value = "内部编码 用于确认唯一车辆")
    private String code;


     @Excel(name = "租户Id", width = 15)
    @ApiModelProperty(value = "租户Id")
    private String tenantId;

	/**车辆码*/
	@Excel(name = "车辆码", width = 15)
    @ApiModelProperty(value = "车辆码")
    private String carCode;


    @Excel(name = "iccid", width = 15)
    @ApiModelProperty(value = "iccid")
    private String iccid;
	/**中控手机号*/
	@Excel(name = "中控手机号(sim号)", width = 15)
    @ApiModelProperty(value = "中控手机号")
    private String phone;

	/**网点id*/
	@Excel(name = "网点id", width = 15)
    @ApiModelProperty(value = "网点id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long meshPointId;

    @TableField(exist = false)
    private String meshPointName;

    /**电子围栏id*/
    @Excel(name = "电子围栏id", width = 15)
    @ApiModelProperty(value = "电子围栏id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long fenceId;

    @TableField(exist = false)
    private String fenceName;

    /**省Id*/
    @Excel(name = "省Id", width = 15)
    @ApiModelProperty(value = "省Id")
    private String provinceId;

    /**城市id*/
    @Excel(name = "城市id", width = 15)
    @ApiModelProperty(value = "城市id")
    private String cityId;

    /**製造商id*/
    @Excel(name = "製造商id", width = 15)
    @ApiModelProperty(value = "製造商id")
    private String manufacturerId;

    /**终端类型*/
    @Excel(name = "终端类型", width = 15)
    @ApiModelProperty(value = "终端类型")
    private String terminalType;

    /**终端id*/
    @Excel(name = "终端id(设备id)", width = 15)
    @ApiModelProperty(value = "终端id")
    private String terminalId;

    /**车牌颜色*/
    @ApiModelProperty(value = "车牌颜色")
    private Integer color;

    /**车牌标识*/
    @Excel(name = "车牌标识", width = 15)
    @ApiModelProperty(value = "车牌标识")
    private String plate;

    /**车牌标识*/
    @Excel(name = "蓝牙识别码", width = 15)
    @ApiModelProperty(value = "蓝牙识别码")
    private String blueCode;

    /**车辆类型id*/
    @Excel(name = "车辆类型id", width = 15)
    @ApiModelProperty(value = "车辆类型id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long carTypeId;

    @TableField(exist = false)
    private String carTypeName;

    @TableField(exist = false)
    private String onlineStatus;

    @TableField(exist = false)
    private String carTypeImage;

    /**车辆类型id*/
    @Excel(name = "蓝牙秘钥", width = 15)
    @ApiModelProperty(value = "蓝牙秘钥")
    private String blueKey;

    /**车辆类型id*/
    @Excel(name = "车架编号", width = 15)
    @ApiModelProperty(value = "车架编号")
    private String frameCode;

    /**电机编号*/
    @Excel(name = "电机编号", width = 15)
    @ApiModelProperty(value = "电机编号")
    @TableField(value = "e_motor_code")
    private String emotorCode;

    /**控制器编号*/
    @Excel(name = "控制器编号", width = 15)
    @ApiModelProperty(value = "控制器编号")
    private String ctrlCode;

    /**自定义编号*/
    @Excel(name = "自定义编号", width = 15)
    @ApiModelProperty(value = "自定义编号")
    private String customCode;

    /**仪表盘编号*/
    @Excel(name = "仪表盘编号", width = 15)
    @ApiModelProperty(value = "仪表盘编号")
    private String dashboardCode;

    /**电池编号*/
    @Excel(name = "电池编号", width = 15)
    @ApiModelProperty(value = "电池编号")
    private String bmsCode;

    /**控制器数据*/
    @Excel(name = "", width = 15)
    @ApiModelProperty(value = "控制器数据")
    private String controlJson;

    /**预估里程*/
    @TableField(exist = false)
    private Integer mileage;

    @TableField(exist = false)
    private Integer assistLevel = 3; // 助力等级 默认3档
    @TableField(exist = false)
    private boolean motorLock = true; // 电机锁 默认上锁
    @TableField(exist = false)
    private boolean powerDisable = true; // 动力禁用 默认禁用
    @TableField(exist = false)
    private Integer speed = 25; // 国标速度 默认25km/h
    @TableField(exist = false)
    private Integer workModeValue = 1; // 工作模式 默认混合
    @TableField(exist = false)
    private Integer startModeValue = 1; // 启动模式 默认非零启动
    @TableField(exist = false)
    public boolean softStartEnabled;  // 软启动开关
    @TableField(exist = false)
    public boolean linkageEnabled;    // 联动功能开关
    @TableField(exist = false)
    public boolean eabsEnabled;       // EABS 开关
    @TableField(exist = false)
    public boolean slopePreventionEnabled; // 防陡坡开关
    @TableField(exist = false)
    public boolean tcsEnabled;        // TCS 开关
    @TableField(exist = false)
    public Integer softStartLevel;        // 软启动等级 (0-31)
    @TableField(exist = false)
    public boolean speedLimitEnabled; // 国标限速开关 (true: 国标限速, false: 解除限速)
    @TableField(exist = false)
    private Integer startGear;   //开机默认为X档

    @TableField(exist = false)
    private Integer parkingToPTime; //停车X秒进P档
    // 设置欠压保护电压
    @TableField(exist = false)
    private Float undervoltageProtection;

    @TableField(exist = false)
    Integer gear1Percentage;
    @TableField(exist = false)
    Integer gear2Percentage;

    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "管理人员")
    private String manageUserId;

    @ApiModelProperty(value = "归属部门机构")
    private String sysOrgCode;
    /**创建日期*/
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**更新日期*/
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**是否删除（0：否、1：是）*/
    @Excel(name = "是否删除（0：否、1：是）", width = 15)
    @ApiModelProperty(value = "是否删除（0：否、1：是）")
    @TableLogic(value="0", delval = "1")
    private Integer isDelete;

    @TableField(exist = false)
    private Boolean isBandingPlate;

}
